Text Editor Patches
version 1.3
©1992, 1993, James W. Walker, all rights reserved.

This application applies various patches to other applications or to desk accessories.  This approach gives more control over conflicts and memory bloat than extending application behavior by adding extensions to the system.

The patching process adds certain resources to the application.  No existing resources are modified, so it is easy to remove the patches if desired.

Installation

Set the checkboxes the way you want them, then click the Patch button.  You will see a standard directory dialog box, which you should use to select the application you want to modify.  If all goes well, then in a few seconds you will see an alert saying that the patches have been applied successfully.

If you should change your mind about the optional settings, just change the checkboxes and patch again.  It is not necessary to unpatch first.  Any patches that are unchecked will automatically be removed.

The Unpatch button removes all of my patches from a selected file, regardless of the checkbox settings.

Compatibility

The patches have been tested with ASLEdit+, BBEdit, and THINK C 5.0.  The HyperCard patch has been tested with HyperCard 2.1, and the AOL patch has been tested with America Online 2.0.1.  They may work with many other programs, but proceed at your own risk.

The patches can be used either with System 7 or with System 6/MultiFinder (except for THINK Link, as noted earlier) but should not be used with System 6 without MultiFinder.

These patches are not compatible with PopUpFuncs, because it uses the same mechanism to add features to an application.  If such a product is installed, the patcher will warn you, and you should normally decide not to do the patch.

The patches reportedly are compatible with CMaster, except that the word wrapping icon will fail to appear.

If you use ClickChange, it may prevent the word wrap icon from appearing unless you exclude the patched applications from ClickChange.

If you use the “Simple Term” tool in ASLEdit+, you probably will not want to use the matched pair patches, because “Simple Term” does not support the arrow keys.

Distribution

These Text Editor Patches and this installer are copyrighted freeware.  They may not be sold or offered for sale, or included with another software product offered for sale, except with the express written permission of the author.  They may be redistributed, so long as they remain unchanged.  Of course, if you want to send me some money for it, you can.

You should not upload a patched version of a copyrighted application to any BBS without permission from the author of the application.

This program is provided as is, and is not guaranteed.

Author’s Address

E-mail:
CompuServe: 76367,2271
America Online: JWWalker
Internet: walkerj@math.scarolina.edu

Hard mail:
James W. Walker
3200 Heyward Street
Columbia, SC 29205

Acknowledgements

Thanks to Larry Gerndt for the idea for THINK Link, and to Susan Lesch for beta testing.  The Emacs Keys patch is by Adolfo Villafiorita.
-----------------------

The Word Wrap Patch

Two of the nicest free text editors, BBEdit Lite and ASLEdit+, lack automatic word wrapping, as does the text editor built into THINK C.  So I designed a hack that adds a simple form of word wrapping to these editors.

When the patch is installed, each title bar of an editing window will contain a small icon indicating whether the word wrapping feature is on or off.  Click on the icon to change its state.  When word wrapping is on, then when the insertion point gets close enough to the right edge of the window, the next space character will be changed into a return character.  If you happen to type a very long word near the margin, or if you type fast on a slow machine, it is possible that you will type past the margin.  This is not a perfect word-wrapping method, but it is the best I can do without access to the application’s internal data structures.

You can prevent an individual space character from being turned into a carriage return by holding down the shift or caps-lock key as you type it.

This patch can also be used with a DA editor, such as the DA form of ASLEdit+, if the DA has been installed directly into an application or has been “application-ized” under System 7.

The THINK Link Patch

With this patch installed, control-double-click on a trap name, and THINK Reference 1.0 will launch or come to the front and will display the page documenting that trap.  This feature requires System 7, and does not work with ASLEdit+.  If you have THINK Reference 2.0, you should not use this patch, but rather get my “Reference Link” extension.

The Pair (), [],  Patch

Generate parentheses, brackets, and braces in pairs.  For instance, if you type a left parenthesis, then a right parenthesis and left arrow will also be inserted for you, so that the insertion point will be poised between the matched pair.

The Pair $$ Patch

Generate dollar signs in pairs as above, for those typing TeX source code.

The Singles Patch

When using one of the pairs patches above, sometimes you want to type the left member of the pair all by itself.  This patch allows you to do so by pressing the control key as well as the usual keys.  For instance a left parenthesis would be control-shift-9, assuming the U.S. keyboard layout.

The ASL Font Patch

Change the default font used in ASLEdit+ from ASLFont+ to Monaco.

An ASLFont+ patch is provided for personal use only.  You should not change the default font of ASLEdit+ if you have any intention of using KanjiTalk or the ASLFont+.  Although you can set the font to ASLFont+ even with the patch in place, that font choice will not be respected the next time you open the document.

If you want ASLEdit+ to use a different default font than Monaco, you will have to use ResEdit either on the patched application or on this installer.  Edit the 'JWfn' resource.  It contains a length byte followed by a font name.

The HyperCard Cursor Patch

For some reason, the text cursor in HyperCard has its “hot spot” in an unusual place, making it more difficult to select some text.  The patch puts the “hot spot” back in the normal position.

The AOL System Menu Patch

When the America Online client software is displaying file download dialogs or various modal dialogs, an attempt to click on a system menu such as the help menu or the application-switching menu justs results in a beep.  This is a clear violation of Apple interface guidelines, as the help menu, at least, is always supposed to be available.  It was particularly irritating to me because my shareware program OtherMenu creates a system menu.  So I wrote a patch that makes the system menus work all the time.  It will probably work in other applications with the same bug.

The Emacs Keys Patch

For those whose fingers were trained by Emacs, this translates some of the most common emacs keystrokes into keystrokes that are understood by BBEdit.  The code was contributed by Adolfo Villafiorita.  The keystrokes are:

^A        beginning of line
^E        end of line
^F        forward character
^B        backward character
^P        previous line
^N        next line
^D        forward delete char
^K        kill to the end of line
^V        next page
OPTION V  previous page

The control-K keystroke is translated into a sequence of 3 keystrokes (cmd-shift-right arrow, shift right arrow, cmd-x) so it is somewhat slow.

The Bell for MATLAB Patch

I wrote this one so that I could make a procedure in Student MATLAB sound a beep.  When a procedure types out a control-G character (ASCII BEL) this patch replaces the character by a beep.